import { axios } from '@/utils/request'

// 获取用户菜单列表
export function getUserMenus(userId) {
  return axios({
    url: '/sys/menu/getMenuTreeByUser/' + userId,
    method: 'get'
  })
}

// 获取列表
export function listMenuTree(param) {
  return axios({
    url: '/sys/menu/list',
    method: 'post',
    data: param
  })
}

// 新增、编辑菜单
export function saveMenu(data) {
  return axios({
    url: '/sys/menu/save',
    method: 'post',
    data: data
  })
}

// 删除
export function deleteMenu(ids) {
  return axios({
    url: '/sys/menu/del?ids=' + ids,
    method: 'delete'
  })
}
